package com.cx.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

/**
 * 
 * 
 * @author cx
 * @email cx@163.com
 * @date 2024-05-09 10:29:02
 */
@Data
@TableName("t_comment")
public class Comment implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * 评论id
	 */
	@TableId
	private Integer id;
	/**
	 * 关联的文章id
	 */
	private Integer articleId;
	/**
	 * 评论时间
	 */
	@JsonFormat(pattern = "yyyy-MM-dd")
	private Date created;
	/**
	 * 评论用户登录的ip地址
	 */
	private String ip;
	/**
	 * 评论内容
	 */
	private String content;
	/**
	 * 评论状态
	 */
	private String status;
	/**
	 * 评论用户用户名
	 */
	private String author;

	@TableField(exist = false)
	private Article article;

}
